/**
 * 
 */
package com.ideeli.webextractor.exe;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;

import com.ideeli.webextractor.context.WebExatractorContext;
import com.ideeli.webextractor.service.LikeService;
import com.ideeli.webextractor.service.SubmitService;
import com.ideeli.webextractor.service.WebExtractInvoker;

/**
 * @author spaida
 *
 */
public class WebExtractor1 {
	
	private static final Logger logger = Logger.getLogger(WebExtractor1.class);
			
	public static void main(String arg[]) throws Exception
	{
		ApplicationContext context =WebExatractorContext.getApplicationContext();
		
		logger.info("Context initialized...");
		
		WebExtractInvoker webExtInvoke=context.getBean("webextractinvoke",WebExtractInvoker.class);
		webExtInvoke.invoke(arg);
		
		logger.info("***start sitemap submission.");
		
		SubmitService submitService=context.getBean("submitservice",SubmitService.class);
		submitService.submit(arg[2]);
		
//		LikeService likeService=context.getBean("likeservice",LikeService.class);
//		likeService.process();
		
		logger.info("All Finished");
		
	}

}
